<template>
  <div>
      <h1>{{$store.state.name}}</h1>
      <p>购物车总数量：{{num}}</p>
      <button @click="num ++">加购</button>
  </div>
</template>

<script>
export default {
    data() {
        return {
            num: 0
        }
    }
}
</script>

<style>

</style>